
def signOn(**kwargs):
    import requests

    cookies = {
        'tempTokenKey': kwargs.get('tempTokenKey'),
    }

    headers = {
        'Host': 'gzmh.zwfw.guizhou.gov.cn',
        'sec-ch-ua-platform': '"Windows"',
        'Authorization': kwargs.get('tempTokenKey'),
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0',
        'Accept': 'application/json, text/plain, */*',
        'sec-ch-ua': '"Microsoft Edge";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',
        'Content-Type': 'application/json;charset=UTF-8',
        'sec-ch-ua-mobile': '?0',
        'Origin': 'https://gzmh.zwfw.guizhou.gov.cn',
        'Sec-Fetch-Site': 'same-origin',
        'Sec-Fetch-Mode': 'cors',
        'Sec-Fetch-Dest': 'empty',
        'Referer': 'https://gzmh.zwfw.guizhou.gov.cn/login/',
        'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
    }

    json_data = {
        'appCode': 'dgov-portal',
        'code': kwargs.get('code'),
        'appId': '445191D0962548D4A400C17835DDA0B9',
        'appCallback': 'https%3A%2F%2Fgzmh.zwfw.guizhou.gov.cn%2Flogin%2Fcallback.html',
    }

    response = requests.post(
        'https://gzmh.zwfw.guizhou.gov.cn/gate/bspplus/oauth/signOn/login',
        cookies=cookies,
        headers=headers,
        json=json_data,
    )
    print(f"\033[94m{response.json()}\033[0m")
    return response.json()

    # Note: json_data will not be serialized by requests
    # exactly as it was in the original request.
    # data = '{"appCode":"dgov-portal","code":"Lbi0VfAQqIFC","appId":"445191D0962548D4A400C17835DDA0B9","appCallback":"https%3A%2F%2Fgzmh.zwfw.guizhou.gov.cn%2Flogin%2Fcallback.html"}'
    # response = requests.post(
    #    'https://gzmh.zwfw.guizhou.gov.cn/gate/bspplus/oauth/signOn/login',
    #    cookies=cookies,
    #    headers=headers,
    #    data=data,
    # )